#ifndef CONNECTION_H
#define CONNECTION_H

#include <QMessageBox>
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include <QtSql/QSqlRecord>

#include "mycomponent.h"

class Connection
{  
public:
    static bool createConnection();
    static bool collectSong(Song* song, MusicList* ml);
    static bool addMusicList(MusicList* ml);
    static bool getSongsFromMusicList(MusicList* ml);
    static bool deleteSongFromMusicList(MusicList* ml, Song* s);
    static bool deleteMusicList(MusicList* ml);
    static MyList<MusicList*>* getMusicLists();

private:
    Connection();

private:
    static QSqlDatabase db;
    static QSqlQuery* query;
};

#endif // CONNECTION_H
